/*****************************************************************************
 *  This file is part of the OpenDomo project.
 *  Copyright(C) 2011 OpenDomo Services SL
 *  
 *  Daniel Lerch Hostalot <dlerch@opendomo.com>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *****************************************************************************/

// ----------------------------------------------------------------------------
// author: Daniel Lerch <dlerch@gmail.com>, http://opendomo.com
// date: Mayo 2007
//
// CHANGES:
//
// ----------------------------------------------------------------------------

#ifndef __UPNP_QUERY_H__
#define __UPNP_QUERY_H__

#ifdef __cplusplus
extern "C" {
#endif



#include <stdlib.h>
#include <upnp/ithread.h>
#include <upnp/upnp.h>
#include <upnp/upnptools.h>
#include <secstr.h>
#include <util.h>


int upnp_query_callback(Upnp_EventType event_type, void *event, void *cookie);
int upnp_query_init();
int upnp_query_cleanup();
int upnp_query_print_device_list(int listen_time);
int upnp_query_print_device_info(const char *data, const char *action_url);
int upnp_query_print_xmldoc(const char *xml_url);
int upnp_query_print_xmlinfo(const char *xml_url);
int upnp_query_query_xml_field(const char *field_name, 
      const char *xml_url, char *value, size_t value_len);
int upnp_query_get_var(const char *varname, const char *action_url);
int upnp_query_exec_action(const char *action_name, const char *csv_params, 
                       const char *action_url, const char *service_type);


#ifdef __cplusplus
}
#endif

#endif




